import request from '/@/utils/request';

/**
 * 后端控制菜单模拟json

 */

/**
 * 获取后端动态路由菜单(admin)

 * @param params 要传的参数值，非必传
 * @returns 返回接口数据
 */
export function getOrganizationalList(params?: object) {
    return request({
        url: '/api/system/organization/query/tree',
        method: 'get',
        params,
    });
}


export function deleteOrgs(orgId: String) {
    return request({
        url: '/api/system/organization/delete/' + orgId,
        method: 'delete',
    });
}

export function saveOrg(keyValue: String, params: object) {
    return request({
        url: '/api/system/organization/save?keyValue=' + keyValue,
        method: 'post',
        data: params,
    });
}

export function getOrgEntity(orgId?: String) {
    return request({
        url: '/api/system/organization/query/' + orgId,
        method: 'get',
    });
}
